import React from 'react';
import { Select } from 'antd';
import styles from './style.less';

const { Option } = Select;
const Selector = ({ data, ...rest }) => (
    <div className={styles.selector}>
        <Select style={{ width: 200 }} {...rest}>
            {data.map(item => (
                <Option value={item.id}>{item.title} </Option>
            ))}
        </Select>
    </div>
);

export default Selector;
